package cn.yangsen.simplebeanmanager.bean.html;

import lombok.Getter;
import lombok.Setter;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

@XStreamAlias("input")
public class Radio extends Input
{
	@Getter
	@XStreamAsAttribute
	private final InputType type = InputType.Radio;
	
	@Getter
	@XStreamAsAttribute
	private Boolean checked;
	
	public void setChecked(boolean checked)
	{
		if(checked)
		{
			this.checked = checked;
		}
		else
		{
			this.checked = null;
		}
	}
	
	@Getter
	@Setter
	@XStreamAsAttribute
	private String onclick;
}
